package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Attention;
import cn.wolfcode.trip.base.query.AttentionQueryObject;
import java.util.List;
import java.util.Map;

public interface AttentionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Attention record);

    Attention selectByPrimaryKey(Long id);

    List<Attention> selectAll();

    int updateByPrimaryKey(Attention record);

    /**
     * 查询粉丝人数
     * @param qo
     * @return
     */
    int selectForFanCountById(AttentionQueryObject qo);

    /**
     * 查询关注的人数
     * @param qo
     * @return
     */
    int selectForAttentionCountById(AttentionQueryObject qo);

    /**
     * 在某一个用户下查询粉丝
     * @param qo
     * @return
     */
    Attention selectForFanById(AttentionQueryObject qo);

    /**
     * 删除粉丝
     * @param attention
     */
    void deleteFan(Attention attention);
}